package com.elong.spring.aspectj.anno;

import java.lang.reflect.Method;

public class TestTool {

    public static void main(String[] args) {
	Class<?> clazz = ForumService.class;
	
	Method[] methods = clazz.getDeclaredMethods();
	System.out.println(methods.length);
	
	for(Method me : methods){
	    NeedTest nt = me.getAnnotation(NeedTest.class);
	    if(nt != null){
		if(nt.value()){
		    System.out.println(me.getName() + "()需要测试");
		} else {
		  System.out.println(me.getName() + "()不需要测试");  
		}
	    }
	}
    }
}
